Skip to content

REF: tests.indexes.numeric.py #41192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 30, 2021

Conversation

topper-123
Copy link
Contributor

This PR ensures that all index instantiation calls in tests.indexes.numeric.py use the _holder class variable instead of the actual index class. This will make it easier to extend the existing tests to tests for the new NumIndex in #41153.

Also renames _holder to _index_cls for all of tests.indexes. I think this is a more descriptive name.

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ideally if you can remove all explict construction and use fixtures (can be in the class itself is fine) instead.

_index_cls = Float64Index
_dtype = np.float64

def create_index(self) -> Float64Index:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could make these into fixtures instead

@jreback jreback added Index Related to the Index class or subclasses Testing pandas testing functions or related to the test suite labels Apr 28, 2021
@topper-123
Copy link
Contributor Author

Ok, I have changed those to fixtures.

@jreback jreback added this to the 1.3 milestone Apr 30, 2021
@jreback jreback merged commit 48c5224 into pandas-dev:master Apr 30, 2021
@topper-123 topper-123 deleted the refactor_test_numeric.py branch April 30, 2021 19:52
yeshsurya pushed a commit to yeshsurya/pandas that referenced this pull request May 6, 2021
JulianWgs pushed a commit to JulianWgs/pandas that referenced this pull request Jul 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Index Related to the Index class or subclasses Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants